home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / IDL / Document.idl < prev    next >
Encoding:
Text File  |  1994-04-19  |  2.6 KB  |  108 lines  |  [TEXT/MPS ]

  1. //# Copyright:    © 1993-94 by Apple Computer, Inc., all rights reserved.
  2. #ifndef _DOCUMENT_
  3. #define _DOCUMENT_
  4.  
  5. #ifndef _ODOBJECT_
  6. #include "ODObject.idl"
  7. #endif
  8.  
  9. #ifndef _REFCTOBJ_
  10. #include "RefCtObj.idl"
  11. #endif
  12.  
  13. #ifndef _DRAFT_
  14. #include "Draft.idl"
  15. #endif
  16.  
  17. //==============================================================================
  18. // Constants
  19. //==============================================================================
  20. const  ODDraftID  kODDefaultDraft =  1;
  21.  
  22. //==============================================================================
  23. // Scalar Types
  24. //==============================================================================
  25. typedef  ODID        ODDocumentID;
  26. typedef  ODISOStr    ODDocumentName;
  27.  
  28. //==============================================================================
  29. // Classes defined in this interface
  30. //==============================================================================
  31. interface   ODDocument;
  32.  
  33. //==============================================================================
  34. // Classes used by this interface
  35. //==============================================================================
  36. interface   ODContainer;
  37.  
  38. //==============================================================================
  39. // ODDocument
  40. //==============================================================================
  41.  
  42. interface ODDocument :  ODRefCntObject 
  43. {
  44.     ODContainer  GetContainer();
  45.     
  46.     ODDocumentID GetID();
  47.       
  48.     ODDocumentName GetName();
  49.       
  50.     void SetName(in ODDocumentName name);
  51.     
  52.     ODStorageUnit GetDocumentProperties();
  53.     
  54.     ODDocument CollapseDrafts(in ODDraft from,
  55.                                 in ODDraft to);
  56.     
  57.     ODDraft  GetDraft(in ODDraftPermissions perms, 
  58.                         in    ODDraftID id,
  59.                         in    ODDraft draft, 
  60.                         in    ODPositionCode posCode, 
  61.                         in    ODBoolean release);
  62.       
  63.     ODDraft  GetBaseDraft( in ODDraftPermissions perms);
  64.     
  65.     ODDraft  CreateDraft(in ODDraft below,
  66.                         in ODBoolean releaseBelow);
  67.       
  68.     void SaveToAPrevDraft(in ODDraft from,
  69.                         in ODDraft to);
  70.     
  71.     void SetBaseDraftFromForeignDraft(in ODDraft draft);
  72.   
  73. // private by convention
  74.  
  75.     void InitDocument(in ODContainer container,
  76.                         in  ODDocumentID id);
  77.  
  78.     ODDocument ReleaseDraft( in ODDraft draft);
  79.     
  80. #ifdef __SOMIDL__
  81.   implementation
  82.   {
  83.     override:
  84.         somInit,
  85.         somUninit,
  86.         IncrementRefCount,
  87.         Release;
  88.     releaseorder:
  89.         GetContainer,
  90.         GetID,
  91.         GetName,
  92.         SetName,
  93.         GetDocumentProperties,
  94.         CollapseDrafts,
  95.         GetDraft,
  96.         GetBaseDraft,
  97.         CreateDraft,
  98.         SaveToAPrevDraft,
  99.         SetBaseDraftFromForeignDraft,
  100.         InitDocument,
  101.         ReleaseDraft;
  102.   };
  103. #endif
  104. };
  105.  
  106. #endif  // _DOCUMENT_
  107.  
  108.